%
%
%
%
function Vam=getPlots(values,dendrites,cells,cell)
t=0:0.005:(size(values,1)-1)*0.005;
directions=dendrites;
close all;
if(dendrites==6)
    % Ibip
    figure
    hold on
    plot(t,values(:,7),'b')
    plot(t,values(:,10),'r')
    plot(t,values(:,13),'g')
    plot(t,values(:,16),'k')
    plot(t,values(:,19),'c')
    plot(t,values(:,22),'y')
    hold off
    xlabel('Time (ms)')
    ylabel('Ibip')
    legend('Ibip 0°','Ibip 60°', 'Ibip 120°', 'Ibip 180°', 'Ibip 240°','Ibip 300°')
    title('Input from bipolar cells on each dendrite')
    box on
    
%     % Current from soma
%     figure
%     plot(t,values(:,9),'m')
%     xlabel('Time (ms)')
%     ylabel('Isoma')
%     legend('I soma')
%     title('Input from the soma of the amacrine cell');
%     box on
%     
%     % Current to soma
%     figure
%     hold on
%     plot(t,values(:,1),'b')
%     plot(t,values(:,2),'r')
%     plot(t,values(:,3),'g')
%     plot(t,values(:,4),'k')
%     plot(t,values(:,5),'c')
%     plot(t,values(:,6),'y')
%     xlabel('Time (ms)')
%     ylabel('Iam per dendrite')
%     legend('Id_0','Id_60', 'Id_120', 'Id_180', 'Id_240', 'Id_300')
%     title('Input to the amacrine cell soma from each dendrite');
%     box on
%     
%     % Voltage of each dendrite
%     figure
%     hold on
%     plot(t,values(:,25),'b')
%     plot(t,values(:,26),'r')
%     plot(t,values(:,27),'g')
%     plot(t,values(:,28),'k')
%     plot(t,values(:,29),'c')
%     plot(t,values(:,30),'y')
%     hold off
%     xlabel('Time (ms)')
%     ylabel('Dendrite`s voltage')
%     legend('0° dendrite','60° dendrite', '120° dendrite', '180° dendrite', '240° dendrite', '300° dendrite')
%     title('Voltage on each dendrite')
%     box on
%     
%     % All the characteristics of the cell
%     figure
%     hold on
%     plot(t,values(:,1),'+b')
%     plot(t,values(:,2),'+r')
%     plot(t,values(:,3),'+g')
%     plot(t,values(:,4),'+k')
%     plot(t,values(:,5),'+c')
%     plot(t,values(:,6),'+y')
%     plot(t,values(:,7),'ob')
%     plot(t,values(:,10),'or')
%     plot(t,values(:,13),'og')
%     plot(t,values(:,16),'ok')
%     plot(t,values(:,19),'oc')
%     plot(t,values(:,22),'oy')
%     plot(t,values(:,9),'m')
%     plot(t,values(:,25),'b')
%     plot(t,values(:,26),'r')
%     plot(t,values(:,27),'g')
%     plot(t,values(:,28),'k')
%     plot(t,values(:,29),'c')
%     plot(t,values(:,30),'y')
%     hold off
%     xlabel('Time (ms)')
%     legend('Id_0','Id_60', 'Id_120', 'Id_180', 'Id_240', 'Id_300','Ibip 0°','Ibip 60°', 'Ibip 120°', 'Ibip 180°', 'Ibip 240°','Ibip 300°','I soma','0° dendrite','60° dendrite', '120° dendrite', '180° dendrite', '240° dendrite', '300° dendrite')
%     title('Inputs and signal for a single amacrine cell')
%     box on
else
    if(dendrites==4)
        % Ibip
        %for i=1:1:cells
        i=cell;
        figure
        subplot(2,3,1)
        hold on
        posicion_vbip1=1+cells*(directions+3*0)+3*(i-1)
        posicion_vbip2=1+cells*(directions+3*1)+3*(i-1)
        posicion_vbip3=1+cells*(directions+3*2)+3*(i-1)
        posicion_vbip4=1+cells*(directions+3*3)+3*(i-1)
        plot(t,values(:,1+cells*(directions+3*0)+3*(i-1)),'b')
        plot(t,values(:,1+cells*(directions+3*1)+3*(i-1)),'r')
        plot(t,values(:,1+cells*(directions+3*2)+3*(i-1)),'g')
        plot(t,values(:,1+cells*(directions+3*3)+3*(i-1)),'k')
        hold off
        xlabel('Time (ms)')
        ylabel('Ibip')
        legend('Ibip right','Ibip up', 'Ibip left', 'Ibip down','Location','SouthEast')
        title('Input from bipolar cells on each dendrite')
        box on

        % Gam
        subplot(2,3,2)
        hold on
        posicion_Iam1=2+cells*(directions+3*0)+3*(i-1)
        posicion_Iam2=2+cells*(directions+3*1)+3*(i-1)
        posicion_Iam3=2+cells*(directions+3*2)+3*(i-1)
        posicion_Iam4=2+cells*(directions+3*3)+3*(i-1)
        plot(t,values(:,2+cells*(directions+3*0)+3*(i-1)),'b')
        plot(t,values(:,2+cells*(directions+3*1)+3*(i-1)),'r')
        plot(t,values(:,2+cells*(directions+3*2)+3*(i-1)),'g')
        plot(t,values(:,2+cells*(directions+3*3)+3*(i-1)),'k')
        hold off
        xlabel('Time (ms)')
        ylabel('Iam = gCL*E_CL')
        legend('Iam_R','Iam_U','Iam_L','Iam_D','Location','SouthEast')
        title('Input from amacrine cells on each dendrite')
        box on
        
        % Current from soma
        subplot(2,3,3)
        plot(t,values(:,3+directions*(cells+3*0)+3*(i-1)),'m')
        xlabel('Time (ms)')
        ylabel('Isoma')
        legend('I soma')
        title('Input from the soma of the amacrine cell');
        box on

        % Current to soma
        subplot(2,3,4)
        hold on
        plot(t,values(:,1*i),'b')
        plot(t,values(:,2*i),'r')
        plot(t,values(:,3*i),'g')
        plot(t,values(:,4*i),'k')
        xlabel('Time (ms)')
        ylabel('Iam per dendrite')
        legend('Id_r','Id_u', 'Id_l', 'Id_d')
        title('Input to the amacrine cell soma from each dendrite');
        box on

        % Voltage of each dendrite
        subplot(2,3,5)
        hold on
        Vam = zeros(size(values,1),4);
        V_right_position=4*directions*cells+i+0*cells
        Vam(:,1) = values(:,V_right_position);
        V_up_position=4*directions*cells+i+1*cells
        Vam(:,2) = values(:,V_up_position);
        V_left_position=4*directions*cells+i+2*cells
        Vam(:,3) = values(:,V_left_position);
        V_down_position=4*directions*cells+i+3*cells
        Vam(:,4) = values(:,V_down_position);
        
        plot(t,values(:,4*directions*cells+i+0*cells),'b')
        plot(t,values(:,4*directions*cells+i+1*cells),'r')
        plot(t,values(:,4*directions*cells+i+2*cells),'g')
        plot(t,values(:,4*directions*cells+i+3*cells),'k')
        hold off
        xlabel('Time (ms)')
        ylabel('Dendrite`s voltage')
        legend('Right dendrite','Superior dendrite', 'Left dendrite', 'Inferior dendrite','Location','SouthEast')
        title('Voltage on each dendrite')
        box on

        % Infinity conductance on each dendrite
        subplot(2,3,6)
        hold on
        plot(t,values(:,5*directions*cells+i+0*cells),'b')
        plot(t,values(:,5*directions*cells+i+1*cells),'r')
        plot(t,values(:,5*directions*cells+i+2*cells),'g')
        plot(t,values(:,5*directions*cells+i+3*cells),'k')
        hold off
        xlabel('Time (ms)')
        ylabel('g_infini')
        legend('Right dendrite','Superior dendrite', 'Left dendrite', 'Inferior dendrite')
        title('Infinity conductance on each dendrite')
        box on
        set(gcf, 'Position', get(0,'Screensize'));
        
        % All the characteristics of the cell
        figure
        hold on
        plot(t,values(:,1+cells*(directions+3*0)+3*(i-1)),'b')
        plot(t,values(:,1+cells*(directions+3*1)+3*(i-1)),'r')
        plot(t,values(:,1+cells*(directions+3*2)+3*(i-1)),'g')
        plot(t,values(:,1+cells*(directions+3*3)+3*(i-1)),'k')
        plot(t,values(:,2+cells*(directions+3*0)+3*(i-1)),'bo')
        plot(t,values(:,2+cells*(directions+3*1)+3*(i-1)),'r+')
        plot(t,values(:,2+cells*(directions+3*2)+3*(i-1)),'go')
        plot(t,values(:,2+cells*(directions+3*3)+3*(i-1)),'k+')
        plot(t,values(:,3+directions*(cells+3*0)+3*(i-1)),'m')
        plot(t,values(:,1*i),'bd')
        plot(t,values(:,2*i),'rd')
        plot(t,values(:,3*i),'gd')
        plot(t,values(:,4*i),'kd')
        plot(t,values(:,4*directions*cells+i+0*cells),'b*')
        plot(t,values(:,4*directions*cells+i+1*cells),'r*')
        plot(t,values(:,4*directions*cells+i+2*cells),'g*')
        plot(t,values(:,4*directions*cells+i+3*cells),'k*')
        hold off
        xlabel('Time (ms)')
        legend('Ibip right','Ibip up', 'Ibip left', 'Ibip down','Iam_R','Iam_U','Iam_L','Iam_D','I soma','Id_r','Id_u', 'Id_l', 'Id_d','Right dendrite','Superior dendrite', 'Left dendrite', 'Inferior dendrite')
        title('Inputs and signal for a single amacrine cell')
        box on
        %end
    end
end
    





